<template>
  <div class="service-container">
    <h2 class="service-title">平台服务</h2>
    <div class="service-cards">
      <div class="service-row">
        <el-card class="service-card" shadow="hover" v-for="(service, index) in servicesRow1" :key="index">
          <div class="service-content">
            <i :class="service.icon"></i>
            <div class="service-name">{{ service.name }}</div>
          </div>
        </el-card>
      </div>
      <div class="service-row">
        <el-card class="service-card" shadow="hover" v-for="(service, index) in servicesRow2" :key="index">
          <div class="service-content">
            <i :class="service.icon"></i>
            <div class="service-name">{{ service.name }}</div>
          </div>
        </el-card>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: 'ServiceCards',
  data() {
    return {
      servicesRow1: [
        { name: '采购信息库', icon: 'el-icon-shopping-cart-full' },
        { name: '供应商信息库', icon: 'el-icon-user' },
        { name: '评标专家信息', icon: 'el-icon-document-checked' }
      ],
      servicesRow2: [
        { name: '企业认证', icon: 'el-icon-office-building' },
        { name: '招标统计', icon: 'el-icon-data-analysis' },
        { name: '采购管理', icon: 'el-icon-setting' }
      ]
    }
  }
}
</script>

<style scoped>
.service-container {
  padding: 40px 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.service-title {
  text-align: center;
  margin-bottom: 30px;
  font-size: 24px;
  color: #333;
  position: relative;
}

.service-title::after {
  content: '';
  display: block;
  width: 50px;
  height: 3px;
  background-color: #409eff;
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
}

.service-cards {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.service-row {
  display: flex;
  justify-content: space-between;
  gap: 20px;
}

.service-card {
  flex: 1;
  cursor: pointer;
  transition: all 0.3s;
}

.service-card:hover {
  transform: translateY(-5px);
}

.service-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 0;
}

.service-content i {
  font-size: 36px;
  color: #409eff;
  margin-bottom: 15px;
}

.service-name {
  font-size: 16px;
  color: #333;
}
</style>
